[WPF C#]Get UserControl or VisualTree in DataValidation of TextBlock
Posted
by dalind
on Stack Overflow
See other posts from Stack Overflow
or by dalind
Published on 2009-05-07T11:57:58Z
Indexed on
2010/04/18
22:03 UTC
Read the original article
Hit count: 494
Hy,
I have a validator set on the text property of a textblock. For a correct validation I would need the parent usercontrol of the textblock, but the only things I have in the validator are the value object (a string) and the culture (doesn't help either).
Does anyone know a way to get certain usercontrols in a class/a method where I have no access to any kind of visual or control of my application.
The problem could be solve if I could give the validator the usercontrol or the textblock as parameters, but I didn't find a way to do so..
Thank you very much for your answers.
Greets
© Stack Overflow or respective owner